package com.huawei.dli.flink.sye.avro;

import com.huawei.hwclouds.drs.avro.Record;
import org.apache.flink.api.common.serialization.SerializationSchema;

public class AvroSerializationSchema implements SerializationSchema<Record> {
  @Override
  public byte[] serialize(Record element) {
    try {
      return element.toByteBuffer().array();
    } catch (Exception e) {
      throw new RuntimeException("Failed to serialize record", e);
    }
  }
}
